home *** CD-ROM | disk | FTP | other *** search
- Path: news.uh.edu!sukku
- From: sukku@menudo.uh.edu (sukumar)
- Newsgroups: comp.lang.c
- Subject: Interesting declaration???
- Date: 23 Jan 1996 22:50:09 GMT
- Organization: University of Houston
- Message-ID: <4e3on1$iir@masala.cc.uh.edu>
- NNTP-Posting-Host: menudo.uh.edu
- X-Newsreader: TIN [version 1.2 PL2]
-
- Hi there,
- I was going through some of the header files of Motif and found an
- interesting declaration like this:
-
- typedef enum{
- NONE,
- ONE,
- TWO} TabelType;
-
- #define TableType unsigned char
-
-
- I haven't seen this kind of declartion before and I tried it after seeing this
- and it worked.!! I was expecting the compiler to throw a flag. Why would
- someone do this??
-
- My best guess is that they are making sure the TableType gets only one
- byte instead of four (On Unix).
-
- Can someone throw some light on this??
-
- TIA
- Srini.
-